package edu.strategy.single.defaults;

import java.awt.Color;

import robocode.AdvancedRobot;
import robocode.Event;
import edu.strategy.single.Single;

public class SavantMicroDefaultStrategy extends Single{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public SavantMicroDefaultStrategy(AdvancedRobot advancedRobot) {
		super(advancedRobot);

	}
	
	@Override
	public void prepare() {
		super.getAdvancedRobot().setAdjustRadarForGunTurn(true);
		super.getAdvancedRobot().setAdjustRadarForRobotTurn(true);
		super.getAdvancedRobot().setColors(Color.white,Color.darkGray,Color.red);
	}

	@Override
	public void work() {
		super.used();
		if(this.getAdvancedRobot().getRadarTurnRemainingRadians()==0){
			this.getAdvancedRobot().setTurnRadarRightRadians(Double.POSITIVE_INFINITY);
		}
		super.getAdvancedRobot().setAhead(40000);
		super.getAdvancedRobot().setTurnRight(90);
		this.getAdvancedRobot().execute();
	}

	@Override
	public void work(Event e) {
		work();
	}

	@Override
	public String toString() {
		return "SavantMicroDefaultStrategy";
	}

}
